﻿using System.Runtime.Serialization;

namespace ElectronicCommerce.Framework.Data.Entity.EntityQueryCondition
{
    [DataContract]
    public enum StringOperator
    {
        /// <summary>
        /// 等于
        /// </summary>
        [EnumMember]
        Equal,
        /// <summary>
        /// 不等于
        /// </summary>
        [EnumMember]
        UnEqual,
        /// <summary>
        /// 包含
        /// </summary>
        [EnumMember]
        Contains,
        /// <summary>
        /// 以...开头
        /// </summary>
        [EnumMember]
        StartsWith,
        /// <summary>
        /// 以...结尾
        /// </summary>
        [EnumMember]
        EndsWith,
        /// <summary>
        /// In
        /// </summary>
        [EnumMember]
        In,
        [EnumMember]
        IsNull,
        [EnumMember]
        IsNotNull,
    }

    public enum NumberOperator
    {
        /// <summary>
        /// 等于
        /// </summary>
        [EnumMember]
        Equal,
        /// <summary>
        /// 不等于
        /// </summary>
        [EnumMember]
        UnEqual,
        /// <summary>
        /// 大于
        /// </summary>
        [EnumMember]
        GT,
        /// <summary>
        /// 大于等于
        /// </summary>
        [EnumMember]
        GTEQ,
        /// <summary>
        /// 小于
        /// </summary>
        [EnumMember]
        LT,
        /// <summary>
        /// 小于等于
        /// </summary>
        [EnumMember]
        LTEQ,
        /// <summary>
        /// 在......之间
        /// </summary>
        [EnumMember]
        Between,
        /// <summary>
        /// 包含
        /// </summary>
        [EnumMember]
        Contains,
        /// <summary>
        /// In
        /// </summary>
        [EnumMember]
        In,
        [EnumMember]
        IsNull,
        [EnumMember]
        IsNotNull,

        /// <summary>
        /// 以...开头
        /// </summary>
        [EnumMember]
        StartsWith,
        /// <summary>
        /// 以...结尾
        /// </summary>
        [EnumMember]
        EndsWith,
    }

    public enum DateTimeOperator
    {
        /// <summary>
        /// 等于
        /// </summary>
        [EnumMember]
        Equal,
        /// <summary>
        /// 不等于
        /// </summary>
        [EnumMember]
        UnEqual,
        /// <summary>
        /// 大于
        /// </summary>
        [EnumMember]
        GT,
        /// <summary>
        /// 大于等于
        /// </summary>
        [EnumMember]
        GTEQ,
        /// <summary>
        /// 小于
        /// </summary>
        [EnumMember]
        LT,
        /// <summary>
        /// 小于等于
        /// </summary>
        [EnumMember]
        LTEQ,
        /// <summary>
        /// 在......之间
        /// </summary>
        [EnumMember]
        Between,
        /// <summary>
        /// In
        /// </summary>
        [EnumMember]
        In,
        [EnumMember]
        IsNull,
        [EnumMember]
        IsNotNull,
    }
}
